Conditions | 2 |
Total Lines | 9 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | import {IObserver} from '../Observer/Observer'; |
||
29 | |||
30 | changePage(newPage: IPageData): void { |
||
31 | 2 | const currentPage: IPageData | null = this.currentPage.value; |
|
32 | 4 | if (currentPage != null && currentPage.name == newPage.name) { |
|
33 | 1 | return; |
|
34 | } |
||
35 | |||
36 | 1 | this.history.replaceState(newPage, newPage.name, newPage.url); |
|
37 | 1 | this.updatePage(newPage); |
|
38 | } |
||
49 |